home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / man / man-part1 / cat4 / csim.4 < prev    next >
Text File  |  1999-09-16  |  2KB  |  133 lines

  1.  
  2.  
  3.  
  4. csim(1)                        Scilab Function                        csim(1)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. NAME
  12.   csim - simulation (time response) of linear system
  13.  
  14. CALLING SEQUENCE
  15.   [y [,x]]=csim(u,t,sl,[x0])
  16.  
  17. PARAMETERS
  18.  
  19.   u    : function, list or string (control)
  20.  
  21.   t    : real vector specifying times  with, t(1) is the initial time
  22.        (x0=x(t(1))).
  23.  
  24.   sl   : list (syslin)
  25.  
  26.   y    : a  matrix such that   y=[y(t(i)], i=1,..,n
  27.  
  28.   x    : a  matrix such that   x=[x(t(i)], i=1,..,n
  29.  
  30. DESCRIPTION
  31.   simulation of the controlled linear system sl.  sl is assumed to be a
  32.   continuous-time system represented by a syslin list.
  33.  
  34.   u is the control and x0 the initial state.
  35.  
  36.   y is the output and x the state.
  37.  
  38.   The control can be:
  39.  
  40.   1. a function : [inputs]=u(t)
  41.  
  42.   2. a list : list(ut,parameter1,....,parametern) such that:
  43.   inputs=ut(t,parameter1,....,parametern) (ut is a function)
  44.  
  45.   3. the string "impuls" for impulse response calculation (here sl is assumed
  46.   SISO without direct feed through and x0=0)
  47.  
  48.   4. the string "step" for step response calculation (here sl is assumed SISO
  49.   without direct feed-through and x0=0)
  50.  
  51. EXAMPLE
  52.   s=poly(0,'s');rand('seed',0);w=ssrand(1,1,3);w(2)=w(2)-2*eye;
  53.   t=0:0.05:5;
  54.   //impulse(w) = step (s * w)
  55.   xbasc(0);xset("window",0);xselect();
  56.   plot2d([t',t'],[(csim('step',t,tf2ss(s)*w))',0*t'])
  57.   xbasc(1);xset("window",1);xselect();
  58.   plot2d([t',t'],[(csim('impulse',t,w))',0*t'])
  59.   //step(w) = impulse (s^-1 * w)
  60.   xbasc(3);xset("window",3);xselect();
  61.   plot2d([t',t'],[(csim('step',t,w))',0*t'])
  62.   xbasc(4);xset("window",4);xselect();
  63.   plot2d([t',t'],[(csim('impulse',t,tf2ss(1/s)*w))',0*t'])
  64.  
  65.  
  66.  
  67. SEE ALSO
  68.   syslin, dsimul, flts, ltitr, rtitr, ode, impl
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.